/*
 * TelaPrincipal.java
 *
 * Created on 26 de Novembro de 2008, 15:57
 */

package br.faimg.pomar.visual;

/**
 *
 * @author  diogo
 */
public class TelaPrincipal extends javax.swing.JFrame {

    /** Creates new form TelaPrincipal */
    public TelaPrincipal() {
        initComponents();
        this.setResizable(false);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        panelPrincipal = new javax.swing.JPanel();
        principalDesktopPane = new javax.swing.JDesktopPane();
        jmenubar = new javax.swing.JMenuBar();
        jMenu1 = new javax.swing.JMenu();
        sairjMenuItem = new javax.swing.JMenuItem();
        jMenu2 = new javax.swing.JMenu();
        jMenu4 = new javax.swing.JMenu();
        jMenuItem2 = new javax.swing.JMenuItem();
        cdastroEstacoesjMenuItem = new javax.swing.JMenuItem();
        cadastrodeTipodeProdutojMenuItem = new javax.swing.JMenuItem();
        jMenuItem1 = new javax.swing.JMenuItem();
        jMenuItem3 = new javax.swing.JMenuItem();
        jMenuItem4 = new javax.swing.JMenuItem();
        jMenu3 = new javax.swing.JMenu();
        jMenuItem5 = new javax.swing.JMenuItem();
        jMenuItem6 = new javax.swing.JMenuItem();
        jMenuItem7 = new javax.swing.JMenuItem();
        jMenuItem8 = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("::: POMAR (PrOduction MAnager and Reporter) by Método4 :::");
        getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        principalDesktopPane.setBackground(new java.awt.Color(204, 204, 204));

        javax.swing.GroupLayout panelPrincipalLayout = new javax.swing.GroupLayout(panelPrincipal);
        panelPrincipal.setLayout(panelPrincipalLayout);
        panelPrincipalLayout.setHorizontalGroup(
            panelPrincipalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(principalDesktopPane, javax.swing.GroupLayout.DEFAULT_SIZE, 850, Short.MAX_VALUE)
        );
        panelPrincipalLayout.setVerticalGroup(
            panelPrincipalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelPrincipalLayout.createSequentialGroup()
                .addComponent(principalDesktopPane, javax.swing.GroupLayout.PREFERRED_SIZE, 541, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        getContentPane().add(panelPrincipal, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 850, 530));

        jMenu1.setText("Arquivo");

        sairjMenuItem.setText("Sair");
        sairjMenuItem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                sairjMenuItemActionPerformed(evt);
            }
        });
        jMenu1.add(sairjMenuItem);

        jmenubar.add(jMenu1);

        jMenu2.setText("Configuração");

        jMenu4.setText("Cadastro");

        jMenuItem2.setText("Usuario");
        jMenuItem2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem2ActionPerformed(evt);
            }
        });
        jMenu4.add(jMenuItem2);

        cdastroEstacoesjMenuItem.setText("Estacoes");
        cdastroEstacoesjMenuItem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cdastroEstacoesjMenuItemActionPerformed(evt);
            }
        });
        jMenu4.add(cdastroEstacoesjMenuItem);

        cadastrodeTipodeProdutojMenuItem.setText("Tipo de Produto");
        cadastrodeTipodeProdutojMenuItem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cadastrodeTipodeProdutojMenuItemActionPerformed(evt);
            }
        });
        jMenu4.add(cadastrodeTipodeProdutojMenuItem);

        jMenuItem1.setText("Produto");
        jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem1ActionPerformed(evt);
            }
        });
        jMenu4.add(jMenuItem1);

        jMenuItem3.setText("Tipo de Erro");
        jMenuItem3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem3ActionPerformed(evt);
            }
        });
        jMenu4.add(jMenuItem3);

        jMenuItem4.setText("Ordem de Produção");
        jMenuItem4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem4ActionPerformed(evt);
            }
        });
        jMenu4.add(jMenuItem4);

        jMenu2.add(jMenu4);

        jmenubar.add(jMenu2);

        jMenu3.setText("Consulta");

        jMenuItem5.setText("Número de Série");
        jMenuItem5.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem5ActionPerformed(evt);
            }
        });
        jMenu3.add(jMenuItem5);

        jMenuItem6.setText("Tipo de Estacao");
        jMenuItem6.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem6ActionPerformed(evt);
            }
        });
        jMenu3.add(jMenuItem6);

        jMenuItem7.setText("Status Produção");
        jMenuItem7.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem7ActionPerformed(evt);
            }
        });
        jMenu3.add(jMenuItem7);

        jMenuItem8.setText("Rota Produção");
        jMenuItem8.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem8ActionPerformed(evt);
            }
        });
        jMenu3.add(jMenuItem8);

        jmenubar.add(jMenu3);

        setJMenuBar(jmenubar);

        pack();
    }// </editor-fold>//GEN-END:initComponents

private void cdastroEstacoesjMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cdastroEstacoesjMenuItemActionPerformed

    CadastrodeEstacao ce = new CadastrodeEstacao();
    ce.pack();
    ce.setVisible(rootPaneCheckingEnabled);
    
    //insere no jdestoppane
    principalDesktopPane.add(ce);
}//GEN-LAST:event_cdastroEstacoesjMenuItemActionPerformed

private void sairjMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_sairjMenuItemActionPerformed
    
    System.exit(0);
}//GEN-LAST:event_sairjMenuItemActionPerformed

private void cadastrodeTipodeProdutojMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cadastrodeTipodeProdutojMenuItemActionPerformed
    CadastrodeTipodeProduto internalWindow = new CadastrodeTipodeProduto();
    internalWindow.pack();
    internalWindow.setVisible(rootPaneCheckingEnabled);

    //insere no jdestoppane
    principalDesktopPane.add(internalWindow);
}//GEN-LAST:event_cadastrodeTipodeProdutojMenuItemActionPerformed

private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem1ActionPerformed
    CadastrodeProduto internalWindow = new CadastrodeProduto();
    internalWindow.pack();
    internalWindow.setVisible(rootPaneCheckingEnabled);

    //insere no jdestoppane
    principalDesktopPane.add(internalWindow);
}//GEN-LAST:event_jMenuItem1ActionPerformed

private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem2ActionPerformed
    CadastrodeUsuario internalWindow = new CadastrodeUsuario();
    internalWindow.pack();
    internalWindow.setVisible(rootPaneCheckingEnabled);

    //insere no jdestoppane
    principalDesktopPane.add(internalWindow);
}//GEN-LAST:event_jMenuItem2ActionPerformed

private void jMenuItem3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem3ActionPerformed
   CadastrodeTipodeErro internalWindow = new CadastrodeTipodeErro();
    internalWindow.pack();
    internalWindow.setVisible(rootPaneCheckingEnabled);

    //insere no jdestoppane
    principalDesktopPane.add(internalWindow);
}//GEN-LAST:event_jMenuItem3ActionPerformed

private void jMenuItem4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem4ActionPerformed
 CadastrodeOrdemdeProducao op = new CadastrodeOrdemdeProducao();
    op.pack();
    op.setVisible(rootPaneCheckingEnabled);

    //insere no jdestoppane
    principalDesktopPane.add(op);
}//GEN-LAST:event_jMenuItem4ActionPerformed

private void jMenuItem5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem5ActionPerformed
CadastrodeNumerodeSerie nu = new CadastrodeNumerodeSerie();
    nu.pack();
    nu.setVisible(rootPaneCheckingEnabled);

    //insere no jdestoppane
    principalDesktopPane.add(nu);
}//GEN-LAST:event_jMenuItem5ActionPerformed

private void jMenuItem6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem6ActionPerformed
CadastrodeTipodeEstacao est = new CadastrodeTipodeEstacao();
    est.pack();
    est.setVisible(rootPaneCheckingEnabled);

    //insere no jdestoppane
    principalDesktopPane.add(est);
}//GEN-LAST:event_jMenuItem6ActionPerformed

private void jMenuItem7ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem7ActionPerformed
    ConsultaProducao conProd = new ConsultaProducao();
    conProd.pack();
    conProd.setVisible(rootPaneCheckingEnabled);

    //insere no jdestoppane
    principalDesktopPane.add(conProd);
}//GEN-LAST:event_jMenuItem7ActionPerformed

private void jMenuItem8ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem8ActionPerformed

    ConsultaRotas view = new ConsultaRotas();
    view.pack();
    view.setVisible(rootPaneCheckingEnabled);
    
    //insere no jdestoppane
    principalDesktopPane.add(view);
    
}//GEN-LAST:event_jMenuItem8ActionPerformed

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new TelaPrincipal().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JMenuItem cadastrodeTipodeProdutojMenuItem;
    private javax.swing.JMenuItem cdastroEstacoesjMenuItem;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenu jMenu2;
    private javax.swing.JMenu jMenu3;
    private javax.swing.JMenu jMenu4;
    private javax.swing.JMenuItem jMenuItem1;
    private javax.swing.JMenuItem jMenuItem2;
    private javax.swing.JMenuItem jMenuItem3;
    private javax.swing.JMenuItem jMenuItem4;
    private javax.swing.JMenuItem jMenuItem5;
    private javax.swing.JMenuItem jMenuItem6;
    private javax.swing.JMenuItem jMenuItem7;
    private javax.swing.JMenuItem jMenuItem8;
    private javax.swing.JMenuBar jmenubar;
    private javax.swing.JPanel panelPrincipal;
    private javax.swing.JDesktopPane principalDesktopPane;
    private javax.swing.JMenuItem sairjMenuItem;
    // End of variables declaration//GEN-END:variables

}
